#ifndef __GUI_PROTOCOL_ENGINE_H__
#define __GUI_PROTOCOL_ENGINE_H__ 1

#include <fstream>
#include <string>

#include "stegio.h"
#include "properties_reader.h"

/**
 * @brief protocol engine for gui
 * @author jwurzer
 * @note capable to operate in full duplex
 *
 */
class CGuiProtocolEngine : public IStegIO
{
public:

	/**
	 * @param pFilenameRead file containing the data that is @b sent
	 * @param pFilenameWrite file containing the data that is @b received
	 */
	CGuiProtocolEngine(CPropertiesReader* pConfig);
	virtual ~CGuiProtocolEngine();

	virtual bool open();
	virtual void close();
	virtual NStegIO::EReadState read(unsigned char& pByte);
	virtual void write(unsigned char pByte);
	virtual int available();

private:
	CGuiProtocolEngine();
	CGuiProtocolEngine(const CGuiProtocolEngine& );
	CGuiProtocolEngine& operator=(const CGuiProtocolEngine& );

	static const std::string sIniSectionName;

	CPropertiesReader* mConfig;
};

#endif // __GUI_PROTOCOL_ENGINE_H__
